﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Wordprocessing;
using intelliEssay.Core.DocumentStructure;
using intelliEssay.Core;
using intelliEssay.Interop;

namespace intelliEssay.PaperLayoutAndParagraphAlignmentChecker
{
    class _testEntry
    {
        static void Main()
        {
            Dictionary<string, string> adobe = new Dictionary<string, string>();
            adobe["1"] = "a";
            //    Helper helper = new Helper(null);
            /* Task t = new Task();
             t.FilePath = "g:\\testdrive\\sample1.docx";
             t.Initialize();
             intelliEssay.Checker.PaperLayoutAndParagraphAlignmentChecker plap = new intelliEssay.Checker.PaperLayoutAndParagraphAlignmentChecker();
             t.AddAChecker(plap);
             var a = intelliEssay.Interop.DocumentAlignmentHelper.QParagraphCenterStatusEx(t.documentStructure.MainDocumentBody.First<Paragraph>(),t.TaskObjectRoot,t.taskSetting.threshold,t.taskSetting.hostApp);
           */
            /*WordprocessingDocument wpd = WordprocessingDocument.Open("g:\\testdrive\\sample1.docx", false);
            wpd.Dispose();
            wpd.MainDocumentPart.Document.Body.ChildElements.Count();
            // t.DebugRun();
             */
            Console.WriteLine("===================Task Information===================");
            Task tsk = new Task();
            tsk.FilePath = @"C:\Users\llmainland\Desktop\基于android平台的文件检索及收藏加密功能的设计与实现.docx";
            tsk.taskType = "nkuB";
            tsk.taskSetting.StandardFormatDocumentPath = @"E:\Programs\ProjectEssayCompiler\TestDrive\intelliEssay\standard format.docx";
            tsk.Initialize();
            tsk.AddAChecker(new intelliEssay.Checkers.PaperLayoutAndParagraphAlignment.PaperLayoutAndParagraphAlignmentChecker());
            tsk.Run(TaskRunMode.Console);
            /*foreach (EssayException e in tsk.GetEssayExceptionCollectionSnapShot().Merge())
            {
                Console.WriteLine("===============EXCEPTION================");
                Console.WriteLine(e.Description);
                Console.WriteLine(e.faultyElement.InnerText);
                Console.WriteLine(e.exceptionType);
                Console.WriteLine("===============END OF EX================");
            }*/
        }
    }
}
